package com.eva.dao.system.model;

import com.eva.framework.mp.model.BaseModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import java.util.Date;

@Data
@Accessors(chain = true)
@SuperBuilder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "系统通知")
@TableName("`system_notice`")
public class SystemNotice extends BaseModel {

    @TableField("`title`")
    @Schema(description = "标题")
    private String title;

    @TableField("`type`")
    @Schema(description = "类型")
    private String type;

    @TableField("`content`")
    @Schema(description = "内容")
    private String content;

    // v5.1.0，scope字段更改为scopes
    @TableField("`scopes`")
    @Schema(description = "作用域")
    private String scopes;

    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @TableField("`start_time`")
    @Schema(description = "开始时间")
    private Date startTime;

    @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @TableField("`end_time`")
    @Schema(description = "结束时间")
    private Date endTime;

    @TableField("`disabled`")
    @Schema(description = "是否禁用")
    private Boolean disabled;

}
